package com.hyh.music.controller.userController;

import com.hyh.music.Result.PageResult;
import com.hyh.music.Result.Result;
import com.hyh.music.domain.domainDTO.SearchDTO;
import com.hyh.music.domain.domainDTO.SongPageDTO;
import com.hyh.music.service.SongService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author hyh
 * @version 1.0
 */
@Slf4j
@RestController
@RequestMapping("/user/songs")
public class UserSongController {
    @Autowired
    SongService songService;

    @GetMapping("/page")
    public Result<PageResult> PageSelect(SearchDTO searchDTO){
        log.info("歌曲分页查询{}",searchDTO);
        PageResult result =  songService.page(searchDTO);
        return Result.success(result);
    }

}
